package univers;

import univers.Domaine.Point;
import univers.Domaine.Vecteur;

public class Avatar {

    public Point position;
    Domaine domaine;
    //
    

    public static class Action {

        public static void print(Avatar A) {
         System.out.println(A);
        }
    }

    Avatar(Domaine domaine) throws CloneNotSupportedException {
        this.domaine = domaine;
        position = Domaine.Origine;
    }

    boolean sedeplace(int NbDePas, Vecteur direction) {

        position.X = position.X + NbDePas * direction.u;
        position.Y = position.Y + NbDePas * direction.v;
        return new Collision(this).testObstacle();

    }

    @Override
    public String toString() {
        return position.toString();
    }

}
